package com.ck.notify;

public class ThreadDemo {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        Thread a = new Thread(myThread,"A");
        Thread b = new Thread(myThread,"B");
        Thread c = new Thread(myThread,"C");
        Thread d = new Thread(myThread,"D");
        Thread e = new Thread(myThread,"E");

        a.start();
        b.start();
        c.start();
        d.start();
        e.start();
    }

    static class MyThread implements Runnable{
        private int count = 5;

        @Override
        public void run() {
            System.out.println("线程"+Thread.currentThread().getName()+" 计算 count = "+count--);

        }
    }
}
